<template>
	<view class="server" style="background: url('../../static/server_mag/ser-back.png') no-repeat;">
		<view class="head">
			<image src="../../static/server_mag/ser-text.png" mode="widthFix" style="width: 66%;height: 50%;"></image>
			<view class="advicebtn" @click="toSuggestion">
				<u-button shape="circle"  type="primary" size="normal">投诉&建议</u-button>
			</view>
		</view>
		<view class="customer">
			<!-- <button class="clearBtn" style="border: none;" open-type="contact" plain="true"> -->
				<view class="item">
					<view class='contact-list'>
						<contact-button size='57' class="online-btn" tnt-inst-id="ilh_9ol2" scene="SCE00183004" />
						<contact-button size='57' class="online-btn" tnt-inst-id="ilh_9ol2" scene="SCE00183004" />
						<contact-button size='57' class="online-btn" tnt-inst-id="ilh_9ol2" scene="SCE00183004" />
						<contact-button size='57' class="online-btn" tnt-inst-id="ilh_9ol2" scene="SCE00183004" />
						<contact-button size='57' class="online-btn" tnt-inst-id="ilh_9ol2" scene="SCE00183004" />
						<contact-button size='57' class="online-btn" tnt-inst-id="ilh_9ol2" scene="SCE00183004" />
						<contact-button size='57' class="online-btn" tnt-inst-id="ilh_9ol2" scene="SCE00183004" />
						<contact-button size='57' class="online-btn" tnt-inst-id="ilh_9ol2" scene="SCE00183004" />
					</view>
					<image class="server-icon" src="../../static/server_mag/message.png" mode="widthFix"></image>
					<view style="font-size: 30rpx;">平台在线客服</view>
				</view>
			<!-- </button> -->
			<view class="item" @click="tellphone">
				<image class="server-icon" src="../../static/server_mag/call.png" mode="widthFix"></image>
				<view style="font-size: 30rpx;">平台热线客服</view>
			</view>
		</view>
		<view style="font-size: 26rpx;text-align: center;color: #6D6D6D;">服务时间：周一至周日09:00~21:00</view>
		
		<view class="itemInfo" @click="toHelp">
			<view class="itemInfo_item">
				<image src="../../static/server_mag/problem.png" mode="widthFix" class="itemInfo_itemPic"></image>
				<view style="color: #333333;font-size: 30rpx;">常见问题</view>
			</view>
			<view class="itemInfo_item">
				<image src="../../static/server_mag/pay.png" mode="widthFix" class="itemInfo_itemPic"></image>
				<view style="color: #333333;font-size: 30rpx;">支付问题</view>
			</view>
			<view class="itemInfo_item">
				<image src="../../static/server_mag/repair.png" mode="widthFix" class="itemInfo_itemPic"></image>
				<view style="color: #333333;font-size: 30rpx;">设备维修</view>
			</view>
			<view class="itemInfo_item">
				<image src="../../static/server_mag/safeguard.png" mode="widthFix" class="itemInfo_itemPic"></image>
				<view style="color: #333333;font-size: 30rpx;">租赁保障</view>
			</view>
		</view>
		
		<view class="guess">
			<view class="title">猜你想问</view>
			<view class="list" v-for="(item,index) in quesson" :key="index" @click="aa(item)">
				<view class="list-info">
					<span  style="font-size: 30rpx;">{{item.text}}</span>
					<image style="width: 16rpx;" src="../../static/server_mag/right-to.png" mode="widthFix"></image>
				</view>
				<view v-show="quesson.length-index>1" style="border: 1rpx solid #E4E4E4;margin-top: 22rpx;"></view>
			</view>
		</view>
		
		<!-- <view class="z-tr" v-for="(item,index) in quesson" :key="index">
			  <view class="z-td">{{index + 1 }}</view>
			  <view class="z-td" :class="{'visited':isvisited==index}" @click="visitfun(index)">{{ item.text }}</view>
		 </view> -->

	</view>
</template>

<script>
	export default {
		data() {
			return {
				quesson:[
					{text:'订单到期后设备如何归还',type:'1'},
					{text:'租期如何计算？',type:'2'},
					{text:'订单如何续租？',type:'3'}
				],
				show:false,
				// isvisited: -1,
				phone: '400-085-0889',
			};
		},
		onShow() {
		},
		mounted() {
			console.log('a');	
		},
		onLoad() {
			
		},
		onPageScroll(e) {
			if(e.scrollTop>=279){
				this.show=true
			}else if(e.scrollTop<250){
				this.show=false
			}
		},

		methods: {
			// visitfun(index){
			// 	this.isvisited=index;
			// },
			tellphone() {
				uni.makePhoneCall({
					phoneNumber: this.phone
				});
			},
			toHelp(){
				uni.navigateTo({
				　　url:"/pagesServe/useing/useing"
				})
			},
			toSuggestion(){
				uni.navigateTo({
				　　url:"/pagesServe/suggestion/suggestion"
				})
			},
			aa(item){
				if(item.type==1){		
					console.log('1111');
				}else if(item.type==2){
					console.log('2222');
				}else if(item.type==3){
					console.log('3333');
				}
			}
		},
	};
</script>

<style lang="scss" scoped>
	// .visited{
	// 	color: blue;
	// }
	.advicebtn ::v-deep .u-button--primary {
		color: #157AFE;
		background-color: transparent;
		border-color: #157AFE;
		
	}
	.advicebtn ::v-deep .u-button {
		height: 70rpx;
		font-size: 28rpx;
	}
	.server {
		height: 100vh;
		width: 100vw;
		min-height: 100vh;
		// background: url('../../static/server_mag/ser-back.png') no-repeat;
		background-size: 100vw 100vh;
		overflow: scroll;

		.head {
			padding: 66rpx 50rpx;
			display: flex;
			justify-content: space-between;
			align-items: flex-end;
		}
		
		.customer{
			padding: 32rpx;
			display: flex;
			justify-content: space-between;
			.clearBtn{
				margin:0;
				padding: 0;
				line-height: 1.35;
				border-radius: 20rpx;
				width: 330rpx;
				height: 156rpx;
				display: flex;
				align-items: center;
				justify-content: space-around;
			}
			.item{
				width: 330rpx;
				height: 156rpx;
				border-radius: 20rpx;
				background-color: #fff;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: space-around;
				position: relative;
				
				.contact-list {
					position: absolute;
					top: 0;
					left: 0;
					width: 100%;
					height: 150rpx;
					z-index: 100;
					overflow: hidden;
					opacity: 0;
				}
				.server-icon{
					width: 60rpx;
					height: 60rpx;
				}
			}
		}
		.navBarWrap {
			position:sticky;
			top:-1px;
			z-index:999;
			margin: 0 !important;
			border-radius: 0px !important;
		}
		.itemInfo {
			height: 155rpx;
			margin: 30rpx 32rpx;
			background-color: #fff;
			display: flex;
			justify-content: space-around;
			border-radius: 20rpx;
			// position: sticky;
			// top: -1px;
			
			.itemInfo_item{
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: space-evenly;
			}
			.itemInfo_itemPic {
				width: 60rpx;
				height: 60rpx;
			}
		}
		
		.guess{
			background-color: #fff;
			height: 378rpx;
			margin: 30rpx 32rpx;
			border-radius: 20rpx;
			.title{
				font-size: 32rpx;
				font-weight: 500;
				padding: 30rpx 0 0 32rpx;
			}
			.list{
				padding: 20rpx 32rpx 6rpx;
				.list-info{
					display: flex;
					align-items: center;
					justify-content: space-between;
				}
			}
		}
	}
</style>
